﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TEST
{
    //1，雇员系统，定义雇员基类，共同的属性，姓名、地址和出生日期(可有可无)，
    class Employee
    {
        protected string _name;
        protected string _dress;
        protected int _birthday;

        public Employee(string name, string dress, int birthday)
        {
            this._name = name;
            this._dress = dress;
            this._birthday = birthday;
        }
    }
    //其中高级主管和程序员采用底薪加提成的方式，高级主管和程序员的底薪分别是5000元和2000元 ，
    class Programmer : Employee
    {
        protected decimal _pushmoney;
        protected decimal _basicsalary;
        public Programmer(decimal pushmoney, decimal basicsalary, string name, string dress, int birthday) : base(name, dress, birthday)
        {
            this._pushmoney = pushmoney;
            this._basicsalary = basicsalary;
        }
        public void Wage()
        {
            Console.WriteLine("底薪：{0}\n提成：{1}\n姓名：{2}\n地址：{3}\n出生日期：{4}", _pushmoney, _basicsalary, _name, _dress, _birthday);
        }
    }
    //秘书和清洁工采用工资的方式，工资分别是3000和1000，以多态的方式处理程序。
    class Secretary : Employee
    {
        protected decimal _salary;
        public Secretary(decimal salary, string name, string dress, int birthday) : base(name, dress, birthday)
        {
            this._salary = salary;
        }
        public void Wage()
        {
            Console.WriteLine("工资：{0}\n姓名：{1}\n地址：{2}\n出生日期：{3}", _salary, _name, _dress, _birthday);
        }
    }

}